<?php
use think\facade\Route;
use app\middleware\IsLogin;
Route::group('View/User',function(){
    Route::rule('register','/api/View/register','GET');
    Route::rule('login','/api/View/login','GET');
    Route::rule('index','/api/View/index','GET');
});
Route::group('user',function(){
   Route::rule('register','/api/User/register','POST');
   Route::rule('login','/api/User/login','POST');
});

Route::group('user',function(){
    Route::rule('logoff','/api/User/logoff','POST');
    Route::rule('isLogin','/api/User/isLogin','POST');
    Route::rule('addFriend','/api/User/addFriend','POST'); //加好友
    Route::rule('handleFriend','/api/User/handFriend','POST'); //处理加好友的请求

})->middleware(IsLogin::class);

